package at.fhj.swd;

/**
 * Implementation of Rose that extends <code>Flower</code>
 * Roses get sold and need a price.
 * 
 * @author  bernadette.pecovnik
 * @version 1.0
 */
public class Rose extends Flower{

	/** stores price of a rose */
	private double price;

	/**
	 * Constructor that initializes a rose with the attributes color, id and price.
	 * 
	 * @param color  represents the color of the rose
	 * @param id     represents the id of the rose
	 * @param price  represents the price of the rose
	 */
	public Rose(String color, int id, double price) {
		// Constructor of Superclass Flower is called
		super(color, id);
		this.price = price;
	}
	
	/**
	 * Prints the attributes of the rose.
	 * Id, color and price are printed with according description.
	 * Overrides printFlower of Superclass <code>Flower</code>
	 */
	public void printFlower() {
		// Method printFlower of Superclass is called
		super.printFlower();
		System.out.println("Preis: " + this.price);
	}
	
	/**
	 * returns the price
	 * 
	 * @return double value as price
	 */
	public double getPrice() {
		return price;
	}

	/**
	 * sets the price
	 * 
	 * @param price  double value for price
	 */
	public void setPrice(double price) {
		this.price = price;
	}
   
}
